// #include "log.h"

#include "log.h"
#include "TimeStamp.h"

#include <iostream>

    Logger *Logger::instance()
    {
        return new Logger();
    }
    void Logger::SetLevel(int loglevel)
    {
        loglevel_ = loglevel;
    }
    void Logger::log(std::string msg)
    {
        switch (loglevel_)
        {
        case 0:
        {
            std::cout << "INFO" << std::endl;
            break;
        }
        case 1:
        {
            std::cout << "ERROR" << std::endl;
            break;
        }
        case 2:
        {
            std::cout << "FATAL" << std::endl;
            break;
        }
        case 3:
        {
            std::cout << "DEBUG" << std::endl;
            break;
        }
        default:
        {
        }
        }

        std::cout << "printTime" << ":" << msg << std::endl;
    }
